﻿#ifndef PARAMETERSETTING_H
#define PARAMETERSETTING_H

#include <QDialog>
#include <QFile>
#include <QKeyEvent>
#include <QMessageBox>
#include <QTextStream>
namespace Ui {
class ParameterSetting;
}

class ParameterSetting : public QDialog {
  Q_OBJECT

 public:
  explicit ParameterSetting(QWidget* parent = nullptr);
  ~ParameterSetting();
  bool isOK();

 private slots:
  void on_pushButton_ok_clicked();
  void on_pushButton_cancel_clicked();
  void on_pushButton_apply_clicked();
  void on_pushButton_download_agv_clicked();
  void on_pushButton_download_navi_clicked();
  void on_pushButton_download_motion_clicked();
  void on_pushButton_download_com_clicked();
  void on_pushButton_download_qrcod_clicked();
  void on_pushButton_num_0_clicked();
  void on_pushButton_num_1_clicked();

  void on_pushButton_num_2_clicked();

  void on_pushButton_num_3_clicked();

  void on_pushButton_num_4_clicked();

  void on_pushButton_num_5_clicked();

  void on_pushButton_num_6_clicked();

  void on_pushButton_num_7_clicked();

  void on_pushButton_num_8_clicked();

  void on_pushButton_num_9_clicked();

  void on_pushButton_num_13_clicked();

  void on_pushButton_num_14_clicked();

  void on_pushButton_num_10_clicked();

  void on_pushButton_num_11_clicked();

  void on_pushButton_num_15_clicked();

  void on_pushButton_num_16_clicked();

  void on_pushButton_num_17_clicked();

  void on_pushButton_num_18_clicked();

  void on_pushButton_left_move_clicked();

  void on_pushButton_right_move_clicked();

  void on_pushButton_download_special_clicked();

 private:
  bool loadFile(const QString& fileName);
  bool saveFile(const QString& fileName);
  void keyPressEvent(QKeyEvent* e);

  bool is_ok = false;
  Ui::ParameterSetting* ui;
  QString nonefile = "./ini/none.ini";
  QString cur_file = nonefile;
};

#endif  // PARAMETERSETTING_H
